package com.yuyou.tas.report.mapper;

import com.yuyou.tas.report.vo.resp.ExamModelSimpleVo;
import com.yuyou.tas.service.api.report.dto.ExamModelDTO;
import com.yuyou.tas.service.api.report.dto.ExamModelVo;
import com.yuyou.tas.service.api.report.entity.ExamModel;
import com.yuyou.tas.util.bean.Pagination;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ExamModelMapper {
    int deleteByPrimaryKey(Long id);

    int insert(ExamModel record);

    ExamModel selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ExamModel record);
    
    int clearBaseLevel(Long id);

    List<ExamModelVo> selectByOrganId(@Param(value = "organId") Long organId);

    List<ExamModel> selectModelByTrimester(@Param(value = "trimesterId") Long trimesterId);

    List<ExamModel> selectModelByLevel(@Param(value = "levelId") Long levelId);

    int findExamModelCount(Pagination<ExamModelDTO> queryPgn);

    List<ExamModelDTO> findExamModelPageList(Pagination<ExamModelDTO> queryPgn);

    List<ExamModelSimpleVo> findStandByParams(@Param(value = "subjectId") Long subjectId ,
                                              @Param(value = "levelId") Long levelId ,
                                              @Param(value = "sectionId") Long sectionId ,
                                              @Param(value = "termId") Long termId ,
                                              @Param(value = "organId") Long organId,
                                              @Param(value = "classId") Long classId,
                                              @Param(value = "type") Integer type,
                                              @Param(value = "activityId") Long activityId);

    List<ExamModelSimpleVo>findDefindByClassId(@Param(value = "classId") Long classId ,
                                               @Param(value = "organId") Long organId,
                                               @Param(value = "type") Integer type,
                                               @Param(value = "levelId") Long levelId,
                                               @Param(value = "activityId") Long activityId);



    List<ExamModelSimpleVo> findOtherStanByParams(@Param(value = "subjectId") Long subjectId ,
                                                  @Param(value = "levelId") Long levelId ,
                                                  @Param(value = "sectionId") Long sectionId ,
                                                  @Param(value = "termId") Long termId ,
                                                  @Param(value = "organId") Long organId,
                                                  @Param(value = "classId") Long classId,
                                                  @Param(value = "type") Integer type,
                                                  @Param(value = "range_type") Integer range_type,
                                                  @Param(value = "activityId") Long activityId);




    List<ExamModelSimpleVo> findOtherDefindByParams(@Param(value = "subjectId") Long subjectId ,
                                                    @Param(value = "sectionId") Long sectionId ,
                                                    @Param(value = "termId") Long termId ,
                                                    @Param(value = "organId") Long organId,
                                                    @Param(value = "classId") Long classId,
                                                    @Param(value = "type") Integer type,
                                                    @Param(value = "range_type") Integer range_type,
                                                    @Param(value = "activityId") Long activityId);

    List<ExamModel> findModelByActivitySubjectWalSectionTrimesterLevelTimetype(@Param(value = "examModelActivityId") Long examModelActivityId, @Param(value = "dataSubject") Long dataSubject,
                                                                               @Param(value = "wal") Integer wal, @Param(value = "baseSectionId") Long baseSectionId,
                                                                               @Param(value = "baseTrimesterId") Long baseTrimesterId, @Param(value = "baseLevelId") Long baseLevelId,
                                                                               @Param(value = "dataTimeType") Long dataTimeType, @Param(value = "rangeType") Integer rangeType);
}